﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="WPFXMPPClient.VCardWindow"
        MouseDown="Window_MouseDown"
        AllowsTransparency="True" WindowStyle="None"
        Title="Update vCard" Height="293" Width="300" Loaded="Window_Loaded">

    <Window.Background>
        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFBBFF81" Offset="0"/>
            <GradientStop Color="#FFEEFFDF" Offset="1"/>
        </LinearGradientBrush>
    </Window.Background>
    
    
	<Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="26" />
            <RowDefinition Height="26" />
            <RowDefinition Height="26" />
            <RowDefinition Height="26" />
            <RowDefinition Height="120" />
            <RowDefinition Height="26" />
        </Grid.RowDefinitions>

        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="200*" />
                <ColumnDefinition Width="40" />
            </Grid.ColumnDefinitions>
            <Label FontWeight="Bold" HorizontalAlignment="Center" Margin="40,0,0,0" Content="Edit User Profile"/>

            <Button Style="{DynamicResource ButtonSurface}" ToolTip="Close" Grid.Column="1" x:Name="ButtonClose" Click="ButtonClose_Click">
                <Image Source="Images/calculator - multiply.png" Width="20" Height="20" HorizontalAlignment="Center" VerticalAlignment="Center" />
            </Button>
        </Grid>
        
        <StackPanel Orientation="Horizontal" VerticalAlignment="Top" Grid.Row="1">
			<Label Width="120" Content="Full Name"/>
			<TextBox Width="120" Text="{Binding Name.GivenName}" />
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Grid.Row="2" >
			<Label Width="120" Content="Nick Name"/>
			<TextBox Width="120" Text="{Binding NickName}" />
		</StackPanel>
		<StackPanel Orientation="Horizontal" d:LayoutOverrides="Height" Grid.Row="4" >
			<Label Width="120" Content="Picture"/>
			<Border BorderBrush="Red">
				<Image Source="Avatars/avatar.png" Height="120" Width="120" Stretch="Uniform"  x:Name="ImagePicture" MouseDown="ImagePicture_MouseDown" />
			</Border>
            <StackPanel>
                <Button Grid.Column="4" Grid.RowSpan="2" Background="{StaticResource ButtonBrush}" 
                        HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
                        VerticalAlignment="Center" x:Name="ButtonSendFromFile" 
                        Click="ButtonSendFromFile_Click"  Width="40" Height="40"  RenderTransformOrigin=".5,.5" 
                        Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" ToolTip="Capture a photo and send it" >
                    <Button.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Button.RenderTransform>
                    <Rectangle Stretch="UniformToFill" Fill="{DynamicResource folder}" Width="28" Height="28" />
                </Button>
                <Button Grid.Column="4" Grid.RowSpan="2" Background="{StaticResource ButtonBrush}" 
                        HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
                        VerticalAlignment="Center" x:Name="ButtonSendPhotoCapture" 
                        Click="ButtonSendPhotoCapture_Click"  Width="40" Height="40"  RenderTransformOrigin=".5,.5" 
                        Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" ToolTip="Capture a photo and send it" >
                    <Button.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Button.RenderTransform>
                    <Rectangle Stretch="UniformToFill" Fill="{DynamicResource camera}" Width="28" Height="28" />
                </Button>                
            </StackPanel>
		</StackPanel>

		<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom" Grid.Row="5">
            <Button x:Name="ButtonYes"  Style="{DynamicResource ButtonSurface}" Width="60" IsDefault="True" Click="ButtonYes_Click" Content="OK"/>
		</StackPanel>

	</Grid>

</Window>
